package com.syf.config.exception;


import com.syf.config.result.ResultCodeEnum;

/**
 * 物模型内错误定义
 */
public enum SpecExceptionEnum implements ResultCodeEnum{

    SPEC_PROTOCOL_UPLOAD_ERROR(510, "产品物模型协议映射文件上传失败"),
    SPEC_PRODUCT_SELECT_ERROR(511, "校验失败:产品查询应该至少一个查询条件值"),
    SPEC_VERSION_SELECT_ERROR(512, "校验失败:version不能为空"),
    SPEC_MAX_PRODUCT_ID_ERROR(513, "产品ID不能超过最大值-12582911"),
    SPEC_URN_FORMAT_ERROR(514, "urn格式错误"),
    SPEC_ENUM_ERROR(515, "获取枚举列表异常"),
    SPEC_INSTANCE_FUNSTION_ERROR(516, "匹配不到要操作实例的方法"),
    SPEC_INSTANCE_SERVICE_ERROR(516, "找不到对应的实例服务"),
    SPEC_DATA_EXIST_ERROR(517, "该数据已经存在，不可重复添加");

    private int code;
    private String msg;

    SpecExceptionEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    SpecExceptionEnum() {
    }

    @Override
    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
